# Contributor: Sergiy Stupar <owner@sestolab.pp.ua>
# Maintainer: Sergiy Stupar <owner@sestolab.pp.ua>
pkgname=katana
pkgver=1.1.0
pkgrel=1
pkgdesc="Next-generation crawling and spidering framework"
url="https://github.com/projectdiscovery/katana"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/projectdiscovery/katana/archive/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build \
		-mod=readonly \
		-ldflags "-extldflags \"$LDFLAGS\"" \
		-o "$pkgname" \
		-v "./cmd/$pkgname/main.go"
}

check() {
	go test -v ./...
}

package() {
	install -Dm755 "$pkgname" -t "$pkgdir"/usr/bin
}

sha512sums="
46b6586d9f3433a0b67e548dbb2c74b96be1f162db35f139cd628873608a8bf0052f6bd265503b02530d08bc29c6986ca30d545d229ad748eacd1ca89e300a88  katana-1.1.0.tar.gz
"
